package jxerializeml.clues.structures;

/**
 * This type represents four possible listeners, which might be
 * triggered during serialization or deserialization process.
 * 
 * @author Tomáš Zíma
 */
public enum ClassListener {
	/** Listener which is triggered before serialization. */
	PRE_SERIALIZE("preserialize"),
	
	/** Listener which is triggered after serialization. */
	POST_SERIALIZE("postserialize"),
	
	/** Listener which is triggered before deserialization. */
	PRE_DESERIALIZE("predeserialize"),
	
	/** Listener which is triggered after deserialization. */
	POST_DESERIALIZE("postdeserialize");
	
	/** Name of the method to be called. */
	private String methodName;
	
	/**
	 * @param methodName
	 *     Name of the method to be called.
	 */
	private ClassListener(String methodName) {
		this.methodName = methodName;
	}
	
	/**
	 * @return
	 *     Name of the method to be called.
	 */
	public String getMethodName() {
		return methodName;
	}
}
